package com.zgh.opcua.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @ClassName OPCConfig
 * @Description Opc配置
 * @Author Administrator
 * @Date 11:03 2025/10/31
 * @Version 1.0
 */

@Data
@Configuration
@SuppressWarnings("JavadocLinkAsPlainText")
public class OPCProperties {
    @Value("${opcua.server.endpoint.endpointUrl}")
    private String endpointUrl;
    @Value("${opcua.server.idp.security}")
    private String security;
    @Value("${opcua.server.idp.username}")
    private String idpUsername;
    @Value("${opcua.server.idp.password}")
    private String idpPassword;
    //保存数据的队列长度
    @Value("${opcua.server.data.save.queueCapacity}")
    private Integer queueCapacity;
    //批量保存数量
    @Value("${opcua.server.data.save.batchSize}")
    private Integer batchSize;
    //最大等待时间（毫秒）
    @Value("${opcua.server.data.save.flushIntervalMs}")
    private Integer flushIntervalMs;
    //队列拉取超时
    @Value("${opcua.server.data.save.pollTimeoutMs}")
    private Integer pollTimeoutMs;
    //写入队列超时
    @Value("${opcua.server.data.save.offerTimeoutMs}")
    private Integer offerTimeoutMs;
}
